package secretary;

import javax.swing.JOptionPane;

import basic.ClientConsole;
import com.sun.rowset.CachedRowSetImpl;

import gui.secretaryScreen;
import guiCode.checkDataBase;
import flexibility.userData;

public class closeSecretaryScreen {





	public void closeSecretearyScreen( int myID,ClientConsole secretaryConnection, userData secretaryData) {// closing
																		// the
																		// connection
																		// to
																		// the
		
		
		secretaryData.deleteAll();//updating database on user leaving the system
		secretaryData.addData(7);
		secretaryData.addData(0);
		secretaryData.addData(myID);

		secretaryConnection.acceptMsg(secretaryData);
		secretaryConnection.getResults();// waiting for database change to
		secretaryData.deleteAll();
		secretaryData.addData(-1);//closing the connection
		secretaryConnection.acceptMsg(secretaryData);



		// happen
	



		// happen
	

		
		
	}
}
